<?php

class Remove extends Controller {

	function Remove() {
		parent::Controller();
	}

	function id($id) {
	 	if( !$this->Account->is_admin() ) {
			redirect( '', 'location');
		}
		$this->Projects->remove($id);
		redirect( 'project/view', 'location');
	}

	function comment($id) {
		$comment = $this->ProjectComments->fetch($id);
		$this->ProjectComments->remove($id);
		redirect( 'project/view/id/'.$comment->project_id.'#comments', 'location');
	}

}

?>
